package one.stand.controller;

import one.stand.model.ResultModel;
import one.stand.request.BusinessCardRequest;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Administrator
 */
@RestController
@RequestMapping("businessCard")
public class BusinessCardController extends BaseController {

    /**
     * 修改名片
     *
     * @param request
     * @return
     */
    @PostMapping("updateCard")
    public ResultModel<Boolean> updateCard(@RequestBody BusinessCardRequest request) {
        return businessCardService.updateCard(request);
    }

    /**
     * 查询用户自己的名片
     *
     * @param request
     * @return
     */
    @PostMapping("getUserCard")
    public ResultModel getUserCard(@RequestBody BusinessCardRequest request) {
        return businessCardService.getUserCard(request);
    }
}
